import request from "@/utils/request";
export function addHelp(help) {
    return request({
        url: '/help/manage',
        method: 'post',
        headers: {
            isToken: true
        },
        data: help
    })
}
export function getHelpManageList(params) {
    return request({
        url: '/help/manage',
        method: 'get',
        headers: {
            isToken: true
        },
        params: params
    })

}
export function deleteHelpById(Id) {
    return request({
        url: "/help/manage/" + Id,
        method: "delete",
        headers: {
            isToken: true
        }
    })
}
export function getAllHelp(params) {
    return request({
        url: "/helpList",
        method: "get",
        headers: {
            isToken: false
        },
        params: params

    })
}
export function helpSearch(params) {
    return request({
        url: "/helpList/search",
        method: "get",
        header: {
            isToken: false
        },
        params: params

    })
}
export function getHelpDetail(helpId) {
    return request({
        url: "/helpDetail/" + helpId,
        method: "get",
        headers: {
            isToken: false
        }
    })
}
export function getCreatorInfo(helpId) {
    return request({
        url: "/help/creatorInfo/" + helpId,
        method: "get",
        headers: {
            isToken: false
        }
    })
}
export function updateViewCount(helpId) {
    return request({
        url: "/help/viewCount/" + helpId,
        method: "put",
        headers: {
            isToken: false
        }
    })
}
export function updateHelp(params) {
    return request({
        url: "/help/manage/",
        method: "put",
        headers: {
            isToken: false
        },
        data: params

    })
}